package net.zjitc.common.lang;

/**
 * @author 毛钰深
 * @create 2022/1/29
 */
public enum Level{
    LEVEL_ONE(0,"一级"),
    LEVEL_TWO(1,"二级"),
    LEVEL_THREE(2,"三级");

    public final Integer level;
    public final String msg;


    Level(Integer level, String msg) {
        this.level = level;
        this.msg = msg;
    }

    public static Level getLevel(Integer type){
        for (Level level : Level.values()) {
            if (level.level.equals(type)){
                return level;
            }
        }
        return null;
    }
}
